package cn.edu.scau.nursingcenter.service.impl;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.edu.scau.nursingcenter.dao.UserRepository;
import cn.edu.scau.nursingcenter.entiry.User;
import cn.edu.scau.nursingcenter.service.UserService;


/**
  * 业务逻辑层接口实现类 UserServiceImpl
 * @author feng
 *
 */
@Service
public class UserServiceImpl implements UserService{
	
	@Autowired
	private UserRepository userRepository;

	/**
	 * 重写登录方法
	 */
	@Override
	public User login(String username, String password) {
		if(StringUtils.isBlank(username)||StringUtils.isBlank(password)) {
			return null;
		}
		return userRepository.login(username, password);
	}

	

}
